package com.shujia.oop.two.private_;

public class Person {
    /*
    private 权限修饰符
    私有的, 只能在当前类的内部可以正常访问
    将不需要对外访问的属性加上 private 关键字
     */
    private String name;
    public int age;

    private void eat() {
        name = "zs";
        System.out.println(name + "喜欢玩睡觉");
    }

    public void playGame() {
        name = "ls";
        System.out.println(name + "喜欢玩游戏");
    }
}
